import org.junit.jupiter.api.Test
import kotlin.math.max

class D {

    @Test
    fun t1() {
        val a = "\u00A0\u0085aaa"
        println(a)
        val a2 = a.trim()
        println(a2)

        val b = '\u00A0'
        println(b.isWhitespace())
        var c1 = "a a";
        var c2 = "a a";
        println(c1 == c2)

    }

    @Test
    fun t2() {
        val list = listOf(1, 2, 3, 4)
        val map = list.associateWith {

            try {
                when (it) {
                    1 -> 1
                    2 -> 2 / 0
                    else -> it
                }
            } catch (e: Exception) {
                e.printStackTrace()
                -1
            }
        }
        println(map)
    }

    @Test
    fun t3(){
        val a:Int? =null


        val b = a?.let { 3 }?: run {
            println("null")
            println("null2")
            4
        }

        println(b)

    }
}